<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/vue.js" type="text/javascript"></script>
</head>
<body>
    <div id="root"> 
        <h3>{{name}}事件处理</h3>
    <button v-on:click="showInfo">点我弹窗</button>
    <button @click="showInfo2">简写点我弹窗</button>
    <a href="键盘事件.html" target="_blank">跳转键盘事件</a>
    
    </div>    

    <script type="text/javascript">
    new Vue({
    el:'#root',
    data:{
        name:"小狐狸"
    },
    methods:{
        showInfo(event){
            console.log(event)
            alert("同学你好1")
        },
        showInfo2(event){
            alert("同学你好2")
        }
    }
    }
    )
    
    </script>
    
</body>
</html>